import torch, torchvision
from torch import nn
from torch.nn import L1Loss
import torch.nn.functional as F

from torchvision import transforms
from torchvision import datasets

dataset_tranforms = transforms.Compose([
    transforms.ToTensor(),
])

train_data = datasets.CIFAR10(root='./datasets', train=True, download=True, transform=dataset_tranforms)
test_data = datasets.CIFAR10(root='./datasets', train=False, download=True, transform=dataset_tranforms)


# length 长度
train_data_len = len(train_data)
test_data_len = len(test_data)

print("训练数据集的长度为：{}".format(train_data_len))
print("测试数据集的长度为：{}".format(test_data_len))


